Component({
  data:{
    isShow:false
  },
  lifetimes:{
    attached(){

        const isShow = !!getApp().token
        this.setData({isShow})

      if (!getApp().token) {
        let currentPages =  getCurrentPages().pop()

        currentPages.onShow = () =>{}
        currentPages.onLoad = () =>{}        
        console.log(currentPages);
        const reductType = wx.utils.isTabBar(currentPages.route)
        wx.redirectTo({
          url: `/pages/login/index?redUrl=${currentPages.route}&reductType=${reductType}`,
        })
      }
    }
  },
  methods: {
  }
})
